package com.jsmtr.rms.dao;

import com.jsmtr.rms.entity.SystemLog;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface DaoService {

    void saveLog(SystemLog log) throws Exception;

    void add(Object obj) throws Exception;

    void delete(Object obj) throws Exception;

    void update(Object obj) throws Exception;

    void merge(Object obj) throws Exception;

    @SuppressWarnings("rawtypes")
    void addAll(List list) throws Exception;

    @SuppressWarnings("rawtypes")
    void updateAll(List list) throws Exception;

    @SuppressWarnings("rawtypes")
    void mergeAll(List list) throws Exception;

    @SuppressWarnings("rawtypes")
    void deleteAll(List list) throws Exception;

    @SuppressWarnings("rawtypes")
    Object get(Class entityClass, Serializable id) throws Exception;

    int executeHQL(String hql) throws Exception;

    int executeHQL(String hql, String param, Object value) throws Exception;

    int executeHQL(String hql, Map<String, Object> param) throws Exception;

    @SuppressWarnings("rawtypes")
    List find(String hql) throws Exception;

    @SuppressWarnings("rawtypes")
    List find(String hql, String[] param) throws Exception;

    @SuppressWarnings("rawtypes")
    List findSql(String sql, String[] param) throws Exception;

    @SuppressWarnings("rawtypes")
    List findSql(String sql) throws Exception;

    @SuppressWarnings("rawtypes")
    List find(String hql, List<String> param) throws Exception;

    @SuppressWarnings("rawtypes")
    List find(String hql, String param, Object value) throws Exception;

    @SuppressWarnings("rawtypes")
    List find(String hql, Map<String, Object> param) throws Exception;

    Object findFirst(String hql) throws Exception;

    Object findFirst(String hql, String param, Object value) throws Exception;

    Object findFirst(String hql, Map<String, Object> param) throws Exception;

    @SuppressWarnings("rawtypes")
    List findLimitSql(String sql, int first, int max) throws Exception;

    @SuppressWarnings("rawtypes")
    List findLimitSqlNew(String sql, int first, int max) throws Exception;

    @SuppressWarnings("rawtypes")
    List findLimit(String hql, int first, int max) throws Exception;

    @SuppressWarnings("rawtypes")
    List findLimit(String hql, String param, Object value, int first, int max) throws Exception;

    @SuppressWarnings("rawtypes")
    List findLimit(String hql, Map<String, Object> param, int first, int max) throws Exception;

    Object findUniqueSql(String sql) throws Exception;

    Object findUniqueSqlNew(String sql) throws Exception;

    Object findUnique(String hql) throws Exception;

    Object findUniqueNew(String hql) throws Exception;

    Object findUnique(String hql, String param, Object value) throws Exception;

    Object findUnique(String hql, Map<String, Object> param) throws Exception;

    int executeSQL(String sql) throws Exception;

    int executeSQLs(List<String> sqls) throws Exception;

    int executeSQL(String sql, String param, Object value) throws Exception;

    int executeSQL(String sql, Map<String, Object> param) throws Exception;

    @SuppressWarnings("rawtypes")
    List executeSQLQuery(String sql) throws Exception;

    @SuppressWarnings("rawtypes")
    List executeSQLQuery(String sql, String param, Object value) throws Exception;

    @SuppressWarnings("rawtypes")
    List executeSQLQuery(String sql, Map<String, Object> param) throws Exception;

    List<Map<String, Object>> executeSQLQueryToMap(final String sql, final Map<String, Object> param) throws Exception;

    List<Map<String, Object>> executeSQLQueryMapPage(final String sql, final Map<String, Object> param,Integer first,Integer max) throws Exception;

    List findSqlS(final String sql, final String[] param) throws Exception;
}